class MyRunnable implements Runnable{
    public void run(){
        while(true){
        System.out.println("hello world");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
public class Java1111 {
    public static void main(String[] args) {
        MyRunnable b = new MyRunnable();
        Thread c = new Thread(b);
        c.start();

        while (true){
        System.out.println("hello");
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }
    }

}










